﻿<%@ Page Language="C#" AutoEventWireup="false" Inherits="Web.BasePage"%>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="Web.Controller" %>
<%@ Import Namespace="Domain.Entities" %>
<%@ Import Namespace="Web.UI" %>

<% if( SecurityUI.IsMaintainMode(null) ){ %>
<a href="Part.aspx?Module=Dealer&Handler=Dealer&Action=New" class="btn-add-dealer">添加经销商</a>
<%} %>

<ul>
<% 
    DealerHandler h = new DealerHandler("Dealer");
    IList<DealerInfo> list = h.Index();

    foreach (DealerInfo info in list)
    {
%>
    <li>
        <%--<input type="checkbox" name="Id" value="<%=info.Id %>" />--%>
        <%= info.Name %>
        <%--<a href="Default.aspx?Module=<%=Module %>&Handler=Dealer&Action=Show&Id=<%=info.Id %>">展示</a>--%>
        <% if( SecurityUI.IsMaintainMode(null) ){ %>
        <a href="Part.aspx?Module=Dealer&Handler=Dealer&Action=Edit&Id=<%=info.Id %>" class="btn-update-dealer">编辑</a>
        <a href="Part.aspx?Module=Dealer&Handler=Dealer&Action=Delete&Id=<%=info.Id %>" class="btn-delete-dealer">删除</a>
        <%} %>
    </li>
<% 
    }
%>
</ul>